package net.nandleon.AgenceVoyage.client.accueil.dataPanel;

import net.nandleon.AgenceVoyage.client.accueil.Accueil;
import net.nandleon.AgenceVoyage.client.accueil.offresMomentCellule.OffresMomentCellule;
import net.nandleon.AgenceVoyage.client.accueil.promotionCellule.PromotionCellule;
import net.nandleon.AgenceVoyage.client.event.EventBus;
import net.nandleon.AgenceVoyage.client.event.loginEvent.LoginEvent;
import net.nandleon.AgenceVoyage.client.ressources.Ressources;

import com.google.gwt.core.client.GWT;
import com.google.gwt.uibinder.client.UiBinder;
import com.google.gwt.uibinder.client.UiField;
import com.google.gwt.user.client.ui.Composite;
import com.google.gwt.user.client.ui.FlexTable;
import com.google.gwt.user.client.ui.Widget;

public class DataPanel extends Composite{

	private static final Binder binder = GWT.create(Binder.class);

	interface Binder extends UiBinder<Widget, DataPanel> {
	}

	static {
		Ressources.INSTANCE.uiDataPanelStyle().ensureInjected();
	}
	
	
	@UiField
	FlexTable tableOffresPanel;

	@UiField
	FlexTable tablePromoPanel;

	public DataPanel() {
		
		initWidget(binder.createAndBindUi(this));
		
		for (int i = 0; i < 3; i++) {
			tableOffresPanel.setWidget(0, i, new OffresMomentCellule(i));

		}
		for (int j = 3; j < 6; j++) {
			tableOffresPanel.setWidget(1, j - 3, new OffresMomentCellule(j));
		}

		for (int i = 0; i < 6; i++) {
			tablePromoPanel.setWidget(i, 0, new PromotionCellule(i));
		}
	}
	
	
	
	
}
